package com.briup.oagg.facade.web.vm.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


/**
 * 新增算子参数
 *
 * @author briup
 */
@ApiModel(description = "新增算子参数")
@Data
public class LearnAlgorithmAddVM {

    @ApiModelProperty(value = "算子名称",example = "深度学习算子1")
    private String algorithmName;

    @ApiModelProperty(value = "算法层显示配置信息",example = "[{\"class_name\":\"开始\",\"config\":{\"type\":\"node\",\"size\":\"72*72\",\"shape\":\"flow-circle\",\"color\":\"#FA8C16\",\"label\":\"开始\",\"x\":468,\"y\":61,\"id\":\"01729835\",\"index\":0}},{\"class_name\":\"组件1\",\"config\":{\"type\":\"fenlei\",\"size\":\"80*48\",\"shape\":\"Conv2D\",\"color\":\"#13C2C2\",\"label\":\"组件1\",\"layoutData\":[{\"padding\":\"valid\"},{\"kernel_size\":[1,2]},{\"filters\":32},{\"strides\":[3,4]}],\"x\":464,\"y\":168.39999389648438,\"id\":\"9ad2e0e8\",\"index\":1}},{\"class_name\":\"组件2\",\"config\":{\"type\":\"fenlei\",\"size\":\"80*48\",\"shape\":\"Masking\",\"color\":\"#13C2C2\",\"label\":\"组件2\",\"layoutData\":[{\"mask_value\":0.5},{\"trainable\":true}],\"x\":465,\"y\":276.3999938964844,\"id\":\"c1437164\",\"index\":2}}]")
    private List<LayerConfigVM> showLayers = new ArrayList<>();

    @ApiModelProperty(value = "图示连线信息",example = "[{\"source\":\"01729835\",\"sourceAnchor\":2,\"target\":\"9ad2e0e8\",\"targetAnchor\":0,\"id\":\"80a37075\",\"index\":3},{\"source\":\"9ad2e0e8\",\"sourceAnchor\":2,\"target\":\"c1437164\",\"targetAnchor\":0,\"id\":\"07dfc1be\",\"index\":4}]")
    private List<Map<String,Object>> links = new ArrayList<>();

    @ApiModelProperty(value = "算子类型(0-分类，1-聚类，2-回归)",example = "0")
    private Integer type;
}
